﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace isct.escada.domain.core
{
    public interface IRepository<TEntity> 
        where TEntity : class
    {
        IUnitOfWork UnitOfWork { get; }
        void Add(TEntity item);
        void Remove(TEntity item);
        void Modify(TEntity item);

        IEnumerable<TEntity> GetAll();
        IEnumerable<TEntity> GetPagedElements<TS>(int pageIndex, int pageCount, Expression<Func<TEntity, TS>> orderByExpression, bool ascending);
        IEnumerable<TEntity> GetFilteredElements(Expression<Func<TEntity, bool>> filter);
    }
}
